using System;
using System.Runtime.InteropServices;

namespace Fireball.ArchLinux.Pacman
{
    /// <summary>
    /// 
    /// </summary>
	public class MiscApi
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="name"></param>
        /// <returns>0 on success, -1 on error (pm_errno is set accordingly)</returns>	
		[DllImport("libalpm")]
		public extern static string alpm_get_md5sum(string name);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <returns>0 on success, -1 on error (pm_errno is set accordingly)</returns>		
		[DllImport("libalpm")]
		public extern static string alpm_get_sha1sum(string name);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="url"></param>
        /// <returns>0 on success, -1 on error (pm_errno is set accordingly)</returns>		
		[DllImport("libalpm")]
		public extern static string alpm_fetch_pkgurl(string url);		
		
		//TODO: alpm_parse_config
	}
}
